import { PluginListenerHandle } from "@capacitor/core";

export interface PositionPlugin {
  //echo(options: { value: string }): Promise<{ value: string }>;
  StartPosition(): Promise<void>;
  PausePosition(): Promise<void>;
  StopPosition(): Promise<void>;
  StartTrackService(): Promise<void>;
  StopTrackService(): Promise<void>;
  addListener(eventName: 'position', listenerFunc: (res: PositionResult) => void,): Promise<PluginListenerHandle>;
  removeAllListeners(): Promise<void>;
}


export interface PositionResult {
  latitude: number;
  longitude: number;
  accuracy: number;
  type: string;
  track_id: string;
  creation_time: number;
}